<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>


    <script>
        //1、参数问题
        //1.1，放入2个参数
        const sum = (num1,num2)=>{
            return num1+num2
        }

        //1.2放入一个参数  (参数的括号可以省略)
        const power= num=>{
            return num*num
        }


        //2.函数中
        //2.1.函数代码块中有多行代码时
        const test = ()=>{
            //1.打印 hello world
            console.log('hello world')

            //2.打印hello vue.js
            console.log('hello vue.js')
        }

        //2.2函数代码块中只有一行代码
     //   const mul = (num1,num2)=>{
     //       return num1+num2
     //   }
        //上面的可以写成这样   返回值时return可以省略 
        const mul = (num1,num2)=>num1*num2

        //没有返回值的情况，也可以说返回值时undefined
        const demo = ()=>console.log('qqqqq')


    </script>


    
</body>
</html>